const env = import.meta.env.VITE_APP_ENV;
const origin: string = window.location.origin;
const isDevelopment = () => {
  return env === "development";
};

export default {
  deptUpExcelUrl: `${origin}/prod-api/sass/dept/excel`,
  crmUrl: isDevelopment() ? "http://192.168.0.168:8088/" : `${origin}/crm-service`,
  formDesign: isDevelopment() ? "http://192.168.1.122:8089/" : `${origin}/flow-service`,
  project: isDevelopment() ? "http://192.168.1.176:9092/" : `${origin}/engineering-service`,
  contractTemplate: isDevelopment() ? "http://192.168.0.202:80/" : `${origin}/contractTemplate-service`,
  salesContract: isDevelopment() ? "http://192.168.0.168:9091/" : `${origin}/salesContract-service`,
  factory: isDevelopment() ? "http://192.168.0.168:8091/" : `${origin}/factory-service`,
  business: isDevelopment() ? "http://192.168.0.168:8091/" : `${origin}/business-service`,
  designer: isDevelopment() ? "http://192.168.0.168:8090/" : `${origin}/designer-service`,
  designForm: isDevelopment() ? "http://192.168.1.176:9093/" : `${origin}/designForm-service`,
  finance: isDevelopment() ? "http://192.168.0.178:8091/" : `${origin}/finance-service`,
  centralizedProcurement: isDevelopment() ? "http://192.168.0.194:8089/" : `${origin}/centralizedProcurement-service`,
  commissionAgent: isDevelopment() ? "http://192.168.0.194:9094/" : `${origin}/commissionAgent-service`
};
